package jpa.entitys.promis.common;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;

import jpa.entitys.common.CommonEntity;


/**
 * The persistent class for the COMPANIES database table.
 * 
 */
@Entity
@Table(name="COMPANIES")
@NamedQueries({
    @NamedQuery(name = "Company.findAll", query = " SELECT c FROM Company c "),
    @NamedQuery(name = "Company.findById", query = " SELECT c FROM Company c WHERE c.company = :Id "),
    @NamedQuery(name = "Company.findBySapCompany", query = " SELECT c FROM Company c WHERE c.sapCompanyCode = :sapCompanyCode ")
})
public class Company extends CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="COMPANY", unique=true, nullable=false, length=2)
	private String company;
	
	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}

	@Column(name="ADDR_FLAG", length=1)
	private String addrFlag;

	@Column(name="ADDRESS", length=300)
	private String address;

	@Column(name="ADDRESS_THAI", length=300)
	private String addressThai;

	@Column(name="ADDRESS2", length=300)
	private String address2;

	@Column(name="ADDRESS3", length=300)
	private String address3;

	@Column(name="ADDRESS4",length=300)
	private String address4;

	@Column(name="ALLOWED_TAX", length=1)
	private String allowedTax;

	@Column(name="ALTERNATE_DESC", length=300)
	private String alternateDesc;

	@Column(name="AMPHUR_CODE", length=2)
	private String amphurCode;

	@Column(name="BANK_AC_NAME", length=300)
	private String bankAcName;

	@Column(name="BANK_AC_NAME_ENG", length=300)
	private String bankAcNameEng;

	@Column(name="BANK_AC_NO", length=30)
	private String bankAcNo;

	@Column(name="BANK_AC_TYPE", length=5)
	private String bankAcType;

	@Column(name="BANK_BRANCH", length=300)
	private String bankBranch;

	@Column(name="BANK_BRANCH_ENG", length=300)
	private String bankBranchEng;

	@Column(name="BANK_CODE", length=30)
	private String bankCode;

	@Column(name="BANK_NAME", length=300)
	private String bankName;

	@Column(name="BANK_NAME_ENG", length=300)
	private String bankNameEng;

	@Column(name="BASE_CURRENCY", length=3)
	private String baseCurrency;

	@Column(name="CASH_AC_CODE", length=15)
	private String cashAcCode;

	@Column(name="CASH_SUB_CODE", length=15)
	private String cashSubCode;

	@Column(name="CITY", length=20)
	private String city;

	@Column(name="COMPANY_ADDRESS", length=255)
	private String companyAddress;

	@Column(name="COMPANY_ID", length=10)
	private String companyId;

	@Column(name="CONTACT_PERSON", length=200)
	private String contactPerson;

	@Column(name="CONTRACT_BY", length=100)
	private String contractBy;

	@Column(name="CONTRACT_ENG_BY", length=100)
	private String contractEngBy;

	@Column(name="COPY_FLAG", length=10)
	private String copyFlag;

	@Column(name="COUNTRY_CODE", length=10)
	private String countryCode;

	@Column(name="CREATED_BY", length=30)
	private String createdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	@Column(name="DESCRIPTION", length=300)
	private String description;

	@Column(name="DESCRIPTION1",length=100)
	private String description1;

	@Column(name="EMAIL", length=50)
	private String email;

	@Column(name="EXCH_GAIN_LOSS_AC_CODE", length=15)
	private String exchGainLossAcCode;

	@Column(name="EXCH_GAIN_LOSS_SUB_AC_CODE", length=15)
	private String exchGainLossSubAcCode;

	@Column(length=20)
	private String fax;

	@Column(name="FAX_NUMBERS", length=20)
	private String faxNumbers;

	@Column(name="FIRST_PERSON", length=300)
	private String firstPerson;

	@Column(length=1)
	private String flag;

	@Column(name="FLAG_ALLOW_PREV_TXN", length=1)
	private String flagAllowPrevTxn;

	@Column(name="FLAG_PAYMENT_REF", length=1)
	private String flagPaymentRef;

	@Column(name="FLAG_PRINT_CHQ_VOUCHER", length=1)
	private String flagPrintChqVoucher;

	@Column(name="FLAG_PRINT_NARRATION", length=1)
	private String flagPrintNarration;

	@Column(name="LAST_UPD_BY", length=30)
	private String lastUpdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

    @Lob()
	private byte[] logo;

	@Column(name="LOGO_FILE", length=100)
	private String logoFile;

	@Column(name="LOGO_FILE_PROJECT", length=100)
	private String logoFileProject;

	@Column(name="LOGO_FILE_PROJECT_SITE", length=100)
	private String logoFileProjectSite;

	@Column(name="LOGO_FILE_SITE", length=100)
	private String logoFileSite;

	@Column(name="MASTER_COMPANY", length=1)
	private String masterCompany;

	@Column(length=200)
	private String narration;

	@Column(name="PDC_PAID_ACC_CODE", length=15)
	private String pdcPaidAccCode;

	@Column(name="PDC_PAID_SUB_CODE", length=15)
	private String pdcPaidSubCode;

	@Column(name="PDC_RCV_ACC_CODE", length=15)
	private String pdcRcvAccCode;

	@Column(name="PDC_RCV_SUB_CODE", length=15)
	private String pdcRcvSubCode;

	@Column(name="PHONE_NUMBERS", length=40)
	private String phoneNumbers;

	@Column(name="POSTAL_CODE", length=10)
	private String postalCode;

	@Column(name="PROVINCE_CODE", length=2)
	private String provinceCode;

	@Column(name="REGISTRATION_NO", length=15)
	private String registrationNo;

	@Column(name="ROAD_CODE", length=30)
	private String roadCode;

	@Column(name="SAP_COMPANY_CODE", length=4)
	private String sapCompanyCode;

	@Column(name="SECOND_CURRENCY", length=30)
	private String secondCurrency;

	@Column(name="SECOND_PERSON", length=300)
	private String secondPerson;

	@Column(name="SEQ_NO", precision=22)
	private BigDecimal seqNo;

	@Column(length=1)
	private String status;

	@Column(name="TAX_ID", precision=13)
	private BigDecimal taxId;

	@Column(name="TAX_PURCHASE_CODE", length=3)
	private String taxPurchaseCode;

	@Column(name="TAX_SALES_CODE", length=3)
	private String taxSalesCode;

	@Column(length=20)
	private String telephone;

	@Column(name="TUMBON_CODE", length=2)
	private String tumbonCode;

	@Column(name="WEB_SITE", length=50)
	private String webSite;

	@Column(name="WHT_LANG", length=1)
	private String whtLang;

	@Column(length=6)
	private String zip;

    public Company() {
    }

	public String getCompany() {
		return this.company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getAddrFlag() {
		return this.addrFlag;
	}

	public void setAddrFlag(String addrFlag) {
		this.addrFlag = addrFlag;
	}

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getAddressThai() {
		return this.addressThai;
	}

	public void setAddressThai(String addressThai) {
		this.addressThai = addressThai;
	}

	public String getAddress2() {
		return this.address2;
	}

	public void setAddress2(String address2) {
		this.address2 = address2;
	}

	public String getAddress3() {
		return this.address3;
	}

	public void setAddress3(String address3) {
		this.address3 = address3;
	}

	public String getAddress4() {
		return this.address4;
	}

	public void setAddress4(String address4) {
		this.address4 = address4;
	}

	public String getAllowedTax() {
		return this.allowedTax;
	}

	public void setAllowedTax(String allowedTax) {
		this.allowedTax = allowedTax;
	}

	public String getAlternateDesc() {
		return this.alternateDesc;
	}

	public void setAlternateDesc(String alternateDesc) {
		this.alternateDesc = alternateDesc;
	}

	public String getAmphurCode() {
		return this.amphurCode;
	}

	public void setAmphurCode(String amphurCode) {
		this.amphurCode = amphurCode;
	}

	public String getBankAcName() {
		return this.bankAcName;
	}

	public void setBankAcName(String bankAcName) {
		this.bankAcName = bankAcName;
	}

	public String getBankAcNameEng() {
		return this.bankAcNameEng;
	}

	public void setBankAcNameEng(String bankAcNameEng) {
		this.bankAcNameEng = bankAcNameEng;
	}

	public String getBankAcNo() {
		return this.bankAcNo;
	}

	public void setBankAcNo(String bankAcNo) {
		this.bankAcNo = bankAcNo;
	}

	public String getBankAcType() {
		return this.bankAcType;
	}

	public void setBankAcType(String bankAcType) {
		this.bankAcType = bankAcType;
	}

	public String getBankBranch() {
		return this.bankBranch;
	}

	public void setBankBranch(String bankBranch) {
		this.bankBranch = bankBranch;
	}

	public String getBankBranchEng() {
		return this.bankBranchEng;
	}

	public void setBankBranchEng(String bankBranchEng) {
		this.bankBranchEng = bankBranchEng;
	}

	public String getBankCode() {
		return this.bankCode;
	}

	public void setBankCode(String bankCode) {
		this.bankCode = bankCode;
	}

	public String getBankName() {
		return this.bankName;
	}

	public void setBankName(String bankName) {
		this.bankName = bankName;
	}

	public String getBankNameEng() {
		return this.bankNameEng;
	}

	public void setBankNameEng(String bankNameEng) {
		this.bankNameEng = bankNameEng;
	}

	public String getBaseCurrency() {
		return this.baseCurrency;
	}

	public void setBaseCurrency(String baseCurrency) {
		this.baseCurrency = baseCurrency;
	}

	public String getCashAcCode() {
		return this.cashAcCode;
	}

	public void setCashAcCode(String cashAcCode) {
		this.cashAcCode = cashAcCode;
	}

	public String getCashSubCode() {
		return this.cashSubCode;
	}

	public void setCashSubCode(String cashSubCode) {
		this.cashSubCode = cashSubCode;
	}

	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCompanyAddress() {
		return this.companyAddress;
	}

	public void setCompanyAddress(String companyAddress) {
		this.companyAddress = companyAddress;
	}

	public String getCompanyId() {
		return this.companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	public String getContactPerson() {
		return this.contactPerson;
	}

	public void setContactPerson(String contactPerson) {
		this.contactPerson = contactPerson;
	}

	public String getContractBy() {
		return this.contractBy;
	}

	public void setContractBy(String contractBy) {
		this.contractBy = contractBy;
	}

	public String getContractEngBy() {
		return this.contractEngBy;
	}

	public void setContractEngBy(String contractEngBy) {
		this.contractEngBy = contractEngBy;
	}

	public String getCopyFlag() {
		return this.copyFlag;
	}

	public void setCopyFlag(String copyFlag) {
		this.copyFlag = copyFlag;
	}

	public String getCountryCode() {
		return this.countryCode;
	}

	public void setCountryCode(String countryCode) {
		this.countryCode = countryCode;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getDescription1() {
		return this.description1;
	}

	public void setDescription1(String description1) {
		this.description1 = description1;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getExchGainLossAcCode() {
		return this.exchGainLossAcCode;
	}

	public void setExchGainLossAcCode(String exchGainLossAcCode) {
		this.exchGainLossAcCode = exchGainLossAcCode;
	}

	public String getExchGainLossSubAcCode() {
		return this.exchGainLossSubAcCode;
	}

	public void setExchGainLossSubAcCode(String exchGainLossSubAcCode) {
		this.exchGainLossSubAcCode = exchGainLossSubAcCode;
	}

	public String getFax() {
		return this.fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public String getFaxNumbers() {
		return this.faxNumbers;
	}

	public void setFaxNumbers(String faxNumbers) {
		this.faxNumbers = faxNumbers;
	}

	public String getFirstPerson() {
		return this.firstPerson;
	}

	public void setFirstPerson(String firstPerson) {
		this.firstPerson = firstPerson;
	}

	public String getFlag() {
		return this.flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public String getFlagAllowPrevTxn() {
		return this.flagAllowPrevTxn;
	}

	public void setFlagAllowPrevTxn(String flagAllowPrevTxn) {
		this.flagAllowPrevTxn = flagAllowPrevTxn;
	}

	public String getFlagPaymentRef() {
		return this.flagPaymentRef;
	}

	public void setFlagPaymentRef(String flagPaymentRef) {
		this.flagPaymentRef = flagPaymentRef;
	}

	public String getFlagPrintChqVoucher() {
		return this.flagPrintChqVoucher;
	}

	public void setFlagPrintChqVoucher(String flagPrintChqVoucher) {
		this.flagPrintChqVoucher = flagPrintChqVoucher;
	}

	public String getFlagPrintNarration() {
		return this.flagPrintNarration;
	}

	public void setFlagPrintNarration(String flagPrintNarration) {
		this.flagPrintNarration = flagPrintNarration;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public byte[] getLogo() {
		return this.logo;
	}

	public void setLogo(byte[] logo) {
		this.logo = logo;
	}

	public String getLogoFile() {
		return this.logoFile;
	}

	public void setLogoFile(String logoFile) {
		this.logoFile = logoFile;
	}

	public String getLogoFileProject() {
		return this.logoFileProject;
	}

	public void setLogoFileProject(String logoFileProject) {
		this.logoFileProject = logoFileProject;
	}

	public String getLogoFileProjectSite() {
		return this.logoFileProjectSite;
	}

	public void setLogoFileProjectSite(String logoFileProjectSite) {
		this.logoFileProjectSite = logoFileProjectSite;
	}

	public String getLogoFileSite() {
		return this.logoFileSite;
	}

	public void setLogoFileSite(String logoFileSite) {
		this.logoFileSite = logoFileSite;
	}

	public String getMasterCompany() {
		return this.masterCompany;
	}

	public void setMasterCompany(String masterCompany) {
		this.masterCompany = masterCompany;
	}

	public String getNarration() {
		return this.narration;
	}

	public void setNarration(String narration) {
		this.narration = narration;
	}

	public String getPdcPaidAccCode() {
		return this.pdcPaidAccCode;
	}

	public void setPdcPaidAccCode(String pdcPaidAccCode) {
		this.pdcPaidAccCode = pdcPaidAccCode;
	}

	public String getPdcPaidSubCode() {
		return this.pdcPaidSubCode;
	}

	public void setPdcPaidSubCode(String pdcPaidSubCode) {
		this.pdcPaidSubCode = pdcPaidSubCode;
	}

	public String getPdcRcvAccCode() {
		return this.pdcRcvAccCode;
	}

	public void setPdcRcvAccCode(String pdcRcvAccCode) {
		this.pdcRcvAccCode = pdcRcvAccCode;
	}

	public String getPdcRcvSubCode() {
		return this.pdcRcvSubCode;
	}

	public void setPdcRcvSubCode(String pdcRcvSubCode) {
		this.pdcRcvSubCode = pdcRcvSubCode;
	}

	public String getPhoneNumbers() {
		return this.phoneNumbers;
	}

	public void setPhoneNumbers(String phoneNumbers) {
		this.phoneNumbers = phoneNumbers;
	}

	public String getPostalCode() {
		return this.postalCode;
	}

	public void setPostalCode(String postalCode) {
		this.postalCode = postalCode;
	}

	public String getProvinceCode() {
		return this.provinceCode;
	}

	public void setProvinceCode(String provinceCode) {
		this.provinceCode = provinceCode;
	}

	public String getRegistrationNo() {
		return this.registrationNo;
	}

	public void setRegistrationNo(String registrationNo) {
		this.registrationNo = registrationNo;
	}

	public String getRoadCode() {
		return this.roadCode;
	}

	public void setRoadCode(String roadCode) {
		this.roadCode = roadCode;
	}

	public String getSapCompanyCode() {
		return this.sapCompanyCode;
	}

	public void setSapCompanyCode(String sapCompanyCode) {
		this.sapCompanyCode = sapCompanyCode;
	}

	public String getSecondCurrency() {
		return this.secondCurrency;
	}

	public void setSecondCurrency(String secondCurrency) {
		this.secondCurrency = secondCurrency;
	}

	public String getSecondPerson() {
		return this.secondPerson;
	}

	public void setSecondPerson(String secondPerson) {
		this.secondPerson = secondPerson;
	}

	public BigDecimal getSeqNo() {
		return this.seqNo;
	}

	public void setSeqNo(BigDecimal seqNo) {
		this.seqNo = seqNo;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public BigDecimal getTaxId() {
		return this.taxId;
	}

	public void setTaxId(BigDecimal taxId) {
		this.taxId = taxId;
	}

	public String getTaxPurchaseCode() {
		return this.taxPurchaseCode;
	}

	public void setTaxPurchaseCode(String taxPurchaseCode) {
		this.taxPurchaseCode = taxPurchaseCode;
	}

	public String getTaxSalesCode() {
		return this.taxSalesCode;
	}

	public void setTaxSalesCode(String taxSalesCode) {
		this.taxSalesCode = taxSalesCode;
	}

	public String getTelephone() {
		return this.telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getTumbonCode() {
		return this.tumbonCode;
	}

	public void setTumbonCode(String tumbonCode) {
		this.tumbonCode = tumbonCode;
	}

	public String getWebSite() {
		return this.webSite;
	}

	public void setWebSite(String webSite) {
		this.webSite = webSite;
	}

	public String getWhtLang() {
		return this.whtLang;
	}

	public void setWhtLang(String whtLang) {
		this.whtLang = whtLang;
	}

	public String getZip() {
		return this.zip;
	}

	public void setZip(String zip) {
		this.zip = zip;
	}

}